// 求和

#include <stdio.h>

int main(int argc, char const *argv[])
{
    int n;
    float sign = 1.0;
    float sum = 0.0;

    scanf("%d", &n);
    for (int i = 1; i <= n; i++)
    {
        sum += sign / i;
        sign = -sign;
    }
    printf("f(%d) = %f\n", n, sum);
    
    return 0;
}